/*
 * FileStreamComparisor.h
 *
 *  Created on: Oct 9, 2013
 *      Author: wji
 */

#ifndef FILESTREAMCOMPARISOR_H_
#define FILESTREAMCOMPARISOR_H_

#include "StreamComparisor.h"

namespace fs {

#define POST_FIX		".seg"
#define JSON_KEY_RIGHT_FILE			"file"
#define JSON_KEY_SEGMENT_FILE		"segment_file"

class FileStreamComparisor: protected fs::StreamComparisor {
private:
	std::string right_filename;
	std::string segment_filename;

	std::ofstream fs_output;
	std::fstream fs_left;
	std::fstream fs_right;

	std::string get_segment_filename();
	void setOutput(std::string output);

public:

	FileStreamComparisor():
		right_filename(""),
		segment_filename(""){};
	virtual ~FileStreamComparisor();

	void setLeft(std::string left);
	void setRight(std::string right);

	Json::Value compare();
};

} /* namespace fs */
#endif /* FILESTREAMCOMPARISOR_H_ */
